<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="zhangfn" uri="http://github.com/zhangkaitao/tags/zhang-functions" %>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/bootstrap-responsive.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/style2.css" type="text/css" media="all" />
     <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/demo.css" type="text/css" media="all" />
    
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery.js"></script>
    
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/bootstrap.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/ckform.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/common.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/showdate.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/laydate/laydate.js"></script>
   	<script src="${pageContext.request.contextPath}/static/js/zoom.js"></script>
   	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery-1.6.2.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/Validform_v4.0_min.js"></script>
    
</head>
<body class="main" class="wraper">
<form:form method="post" commandName="exp" class="registerform"  enctype="multipart/form-data">
	<form:hidden path="id" />
		<table class="table table-bordered table-hover definewidth m10" style="margin-left:3%;margin-top:2%;">		
	 	<tr> 		
        	<td width="10%" class="tableleft" >*广告名称 </td>
        	<td><form:input path="advertName" style="height: 41px; width: 300px" datatype="*"  nullmsg="广告名称不能为空！"/></td>
      		<td><div class="Validform_checktip"></div></td>
    	</tr>
		<tr>
        	<td width="10%" class="tableleft" >*广告上传时间</td>
        	<td><form:input path="advertUploadTime" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon" datatype="*" nullmsg="上传时间不能为空!"/></td>
    	</tr>
    	<tr>
        	<td width="10%" class="tableleft" >*活动开始时间</td>
       		<td><form:input path="advertStartTime" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon" datatype="*" nullmsg="活动开始时间不能为空!"/></td>
    	</tr>
     	<tr>
       		<td width="10%" class="tableleft" >*活动结束时间</td>
       		<td><form:input path="advertOverTime" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon" datatype="*" nullmsg="活动结束时间不能为空!"/> </td>
    	</tr>
    	<tr> 		
        	<td width="10%" class="tableleft" >*广告地址 </td>
        	<td><form:input path="advertUrl" style="height: 41px; width: 300px" datatype="*"  nullmsg="广告地址不为空！"/></td>	
    	</tr>
    	 <tr>
        	<td class="tableleft">*显示频率</td>
        	<td> 
        		<div style="margin:0 auto;">
        			 <form:select path="frequency">                    
                  <!--  <form:option value="0">不限</form:option>   -->
                   	<form:option value="0">一次</form:option>  
                   	<form:option value="1">不限</form:option> 
                   	<form:option value="2">每天一次</form:option>   
                 	</form:select>  	            
             	</div> 
        	</td>
    	</tr>
    	<tr>
        	<td class="tableleft">*广告类型</td>
        	<td> 
        		<div style="margin:0 auto;">
        			 <form:select path="advertType">                    
                  <!--  <form:option value="0">不限</form:option>   -->
                   	<form:option value="0">html5</form:option>  
                   	<form:option value="1">活动</form:option>
                   	<form:option value="2">广播详情</form:option>  
                 	</form:select>  	            
             	</div> 
        	</td>
    	</tr>  
    	<tr>
        	<td class="tableleft">*适用人群</td>
        	<td> 
        		<div style="margin:0 auto;">
        		<input type="radio" value="0" name="sex" checked="checked">不限
        		<input type="radio" value="1" name="sex" >男
        		<input type="radio" value="2" name="sex">女	            
             	</div> 
        	</td>
    	</tr>  
    	<tr>
    	<td width="10%" class="tableleft" >活动图片</td>
     <c:if test="${exp.advertImg != null}">
     	<td><img src="${exp.advertImg}" data-action="zoom" width="334px" /><br>
     </c:if>
     </tr>
    
   	 	<c:if test="${op != '删除'}">    
    	 <tr>
        	<td class="tableleft">*上传活动图片</td>
        	<td>图片1：<input type="file" name="files"  /><br>                        
    	</tr>
   		 </c:if> 	
    	<tr>
        	<td class="tableleft"></td>
        	<td>
        	<dd><input type="submit" value="${op}" id="submit"></dd>
           		<%-- <form:button>${op}</form:button> --%>             
       		</td>
    	</tr>
	</table>
</form:form>
</body>
<script type="text/javascript">

var isCommitted = false;//表单是否已经提交标识，默认为false
function dosubmit(){
   if(isCommitted==false){
         isCommitted = true;//提交表单后，将表单是否已经提交标识设置为true
        return true;//返回true让表单正常提交
    }else{
        return false;//返回false那么表单将不提交
    }
}

$(function(){
	//$(".registerform").Validform();  //就这一行代码！;
	
	$(".registerform").Validform({
		tiptype:1
	});
})
</script>
</html>
<script>
function jump(){
 window.location.href="placardQuery.html";
}
</script>